package cn.wolfcode.domain;

import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;


@Setter
@Getter
public class CustomerTraceHistory {

    public static final int STATUS_NORMAL = 3;//正式客户
    public static final int STATUS_FAIL = 2;//开发失败
    public static final int STATUS_LOST = 1;//流失客户

    private Long id;
    //跟进时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date traceTime;
    //跟进内容
    private String traceDetails;
    //跟进方式
    private SystemDictionaryItem traceType;
    //跟进结果
    private Integer traceResult;
    //客户
    private Customer customer;
    //录入人
    private Employee inputUser;

    public String getTraceResult() {
        switch (traceResult) {
            case STATUS_NORMAL:
                return "优";
            case STATUS_FAIL:
                return "良";
            default:
                return "差";
        }
    }
}
